package model;

public class Food{

	private double carbo;
	private double protein;
	private double fat;
	private String baseQuantity;
	
	public Food(double c, double p, double f, String q) {
		carbo = c;
		protein = p;
		fat = f;
		baseQuantity = q;
	}

	public double getCarbo() {
		return carbo;
	}

	public double getProtein() {
		return protein;
	}

	public double getFat() {
		return fat;
	}

	public String getBaseQuantity() {
		return baseQuantity;
	}
	
	/*
	 * WARNING!! Calories calculation is ALWAYS INTEGER 
	 * (ALSO INTERMEDIATE VALUES ARE TAKEN AS INTEGERS)
	 */
	public int getCalories(int quantity) {
		return (int) Math.round(quantity*(carbo*4 + protein*4 + fat*9));
	}
}
